# !/usr/bin/env python
# coding:utf-8
"""
    Author = 上善若水(QQ:564667570)
    Affiliation = Institute of Subtropical Agriculture, Chinese Academy of Sciences
    Time = '2018-3-2, 15:39'
"""
# import modules
import pandas as pd
import numpy as np
from scipy import linalg

# 1. input all variables and built a newfile
database = "RawDataOfMao.xlsx"
data = pd.read_excel(database, sheet_name='Sheet3', header=0)
# print(type(data))
# print(data['Carb'].astype(float).head())
# print(data['Carb'].describe())
print(data.describe())
# print(data.Carb.describe())

# 3. set a function to calculate the values
def coefficient_values(a1, b1, e1, y1):
    x1 = 1
    x2 = 1
    x3 = 1
    for a1, b1, c1, y1 in list(ord(x1, x2, x3, y2)):
        if ord(y2) ==
    y1 = a1 * x1 + b1 * x2 + e1 * x3
    return (x1, x2, x3)
# 2. to calculate the dataset
a = data['Carb'].values
b = data['Starch'].values
# c = data['NDF_fiber'].values
# d = data['ADF_fiber'].values
e = data['Protein'].values
y = data['Ac'].values

print(a)
equation = coefficient_values(a, b, e, y)
print(equation)




